
/**
 * temp contentPlot
 */
import posts from '@/plugins/request'

// initial state
const state = {
  contentPlotList: []
}
// getters
const getters = {
  getContentPlotList: state => state.contentPlotList
}
// actions
const actions = {
  async submitForm({ commit }, param) {
    let result = await posts.postContentPlotForm(param)
    return result
  },
  async getContentPlotList({commit}, param) {
    let data = await posts.fetchContentPlotList(param)
    commit('changeContentPlotList', data)
  },
  async fetchStationConsumable({commit}, param) {
    let result = await posts.fetchStationConsumable(param)
    return result
  }
}

// mutations
const mutations = {
  changeContentPlotList(state, data) {
    state.contentPlotList = data
  }
}
export default {
  state,
  getters,
  actions,
  mutations
}